package com.ghsc.ghxc.jsb.ui.message.view

import android.content.Context
import android.widget.TextView
import com.ghsc.ghxc.jsb.R
import com.ghsc.ghxc.jsb.config.UserManager
import com.lxj.xpopup.core.BubbleAttachPopupView

/**
 * 项目：JingShortVideo
 * 包名：com.bbl.jyShortVideo.ui.chat.view
 * 类名：ChatTopPopVIew
 * 创建时间：2022/10/8 10:44
 * 创建人 @author： xiaolin
 * 描述 ：Todo...聊天上面
 */
class ChatTopPopVIew(context: Context,
                     tvBtnNewGroup:()->Unit,
                     tvBtnAddFriends:()->Unit,
                     tvBtnGroup:()->Unit,
                     tvBtnSet:()->Unit,
                     ) : BubbleAttachPopupView(context) {
    private var tvBtnNewGroup: () -> Unit = tvBtnNewGroup
    private var tvBtnAddFriends: () -> Unit = tvBtnAddFriends
    private var tvBtnGroup: () -> Unit = tvBtnGroup
    private var tvBtnSet: () -> Unit = tvBtnSet
    override fun getImplLayoutId(): Int {
        return  R.layout.chat_top_item

    }

    override fun onCreate() {
        super.onCreate()
        findViewById<TextView>(R.id.tvBtnNewGroup).setOnClickListener {
            tvBtnNewGroup.invoke()
            dismiss()
        }

        findViewById<TextView>(R.id.tvBtnAddFriends).setOnClickListener {
            tvBtnAddFriends.invoke()
            dismiss()
        }
        findViewById<TextView>(R.id.tvBtnGroup).setOnClickListener {
            tvBtnGroup.invoke()
            dismiss()
        }
        findViewById<TextView>(R.id.tvBtnSet).setOnClickListener {
            tvBtnSet.invoke()
            dismiss()
        }

    }
}